package com.yanqu.road.entity.enums;

/**
 * @author duli
 * @version 1.0
 * @date 2020/10/29 18:30
 * @Description 联姻状态
 */
public enum MarriageStatusType implements ConvertibleEnum<Integer> {

    WAIT(0,"等待联姻"),

    APPLY(1,"求婚中"),

    MARRIED(2,"已婚"),

    LONELY(3,"孤独终老")
    ;
    private int intValue;
    private String name;
    MarriageStatusType(int value, String name) {
        intValue = value;
        this.name=name;
    }
    @Override
    public Integer getIntValue() {
        return intValue;
    }

    @Override
    public String getName() {
        return name;
    }
    public static MarriageStatusType forValue(int value) {
        for (MarriageStatusType type : MarriageStatusType.values()) {
            if (type.intValue == value) {
                return type;
            }
        }
        return null;
    }
}
